<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateConfigsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('configs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');//游戏名字
            $table->string('res_id')->unique();//游戏id

            $table->boolean('check')->default(false);//是否开启欺骗
            $table->boolean('rate')->default(false);//是否开启骗评论模式
            $table->string('alert_title')->nullable();//骗评论标题
            $table->string('alert_message')->nullable();//骗评论内容
            $table->integer('alert_delay')->default(30);//骗评论弹出世间,默认30秒
            $table->string('alert_url')->nullable();//骗评论跳转地址
            $table->string('banner_id');//admob banner id
            $table->string('interstitial_id');//admob 插屏id

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('configs');
    }
}
